package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@ToString
public class InsureInfo {
    public static final Integer REFUSE = 0;//拒保
    public static final Integer UNCOMMIT = 1;//暂存未提交状态
    public static final Integer UNAUDIT = 2;//提交未审核
    public static final Integer RETURNED = 3;//退回修改
    public static final Integer UNPAY = 4;//审核未交费
    public static final Integer FINISH = 5;//已交费
    private Long id;//保单id

    private Client client;//关联的客户

    private Car car;//关联的车辆信息

    private String sn;//保单编号

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date applyDate;//申请日期

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date auditDate;//审核日期

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date beginDate;//保险开始日期

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;//保险截止日期

    private Integer time;//保险时长

    private Employee inputUser;//业务员/录入人

    private Employee auditUser;//审核人

    private BigDecimal totalAmount;//投保金额

    private Integer state = InsureInfo.UNCOMMIT;//保单状态

    private String opinion;//批改信息

    private List<Product> products = new ArrayList<>();//产品

    private Organization organization;//机构信息

    private String payMethod;//支付方式

}